Table of content

License Agreement

Welcome to Serial ToolKit !

  Overview of features

  System requirements

    Operating System

  Getting Help - Technical Support

Installing Serial ToolKit

  Demo Version

Using Serial ToolKit

  Initialization

    STK_Init

  Getting informations about available serial ports

    STK_CountPorts

    STK_GetIndPort

  Opening and closing serial ports

    STK_Open

    STK_Close

  Configuring serial ports

    STK_Reset

    STK_HShake

    STK_SetBuf

  Getting informations about an opened serial port

    STK_Status

    STK_GetBuf

  Sending and receiving data

    STK_Send

    STK_Receive

License Agreement

Serial ToolKit for 4D
Developer Software License and Limited Warranty

PLEASE READ THIS LICENSE CAREFULLY BEFORE USING THE SOFTWARE. BY USING THE SOFTWARE AND ENTERING THE LICENSE NUMBER, YOU (LICENSEE) AGREE TO BECOME BOUND BY THE TERMS OF THIS AGREEMENT, WHICH INCLUDES THE SOFTWARE LICENSE AND WARRANTY DISCLAIMER (collectively referred to herein as the "Agreement"). THIS AGREEMENT CONSTITUTES THE COMPLETE AGREEMENT BETWEEN YOU AND THE AUTHOR. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, DO NOT USE THE SOFTWARE AND PROMPTLY RETURN IT FOR A FULL REFUND.

1.Definitions.
COMPILED: A set of high level language instructions as been transformed into a set of processor level instructions which.
APPLICATION: Software developed by the LICENSEE intended to be used in a Compiled form with the Program and which should never allow use of the Program outside the scope of the Application.
DEVELOPMENT LICENSE: Annual renewable license granted to the LICENSEE to allow him to use the SOFTWARE in his developments. This license includes a limited DEPLOYMENT LICENSE.
DEPLOYMENT LICENSE: License required for each deployment (installation and use) of COMPILED APPLICATIONS by the LICENSEE.

2.Ownership of Software.
The enclosed manual and computer programs ("THE SOFTWARE") were developed and are copyrighted by Christian Quest, the author of Serial ToolKit for 4D ("THE AUTHOR") and are licensed, not sold, to you by THE AUTHOR for use under the following terms, and THE AUTHOR reserves any rights not expressly granted to you. You own the disk(s) on which any software is recorded, but THE AUTHOR retains ownership of all copies of THE SOFTWARE itself. Neither the manual nor THE SOFTWARE may be copied in whole or in part except as explicitly stated below.

3.Intellectual Property.
THE SOFTWARE and its manual is intellectual property of THE AUTHOR and/or its suppliers protected as such by French copyright law, international treaty provisions, and applicable laws of the country in which it is being used.
Trademarks, logos and trade-names quoted in this Agreement, on or in THE SOFTWARE are the property of their respective owners.
Any reproduction of THE SOFTWARE is only granted on the absolute condition that it contains all the legal specifications of THE SOFTWARE property.

4.License granted.
4.1 Software License. THE AUTHOR hereby grants to the LICENSEE, a non-exclusive, non-transferable license (the "License") to use and distribute THE SOFTWARE, for the purpose of distributing LICENSEE's own computer software (the "Licensee's Software") and to copy and distribute the SOFTWARE which are automatically embedded into Licensee's Software, either on a commercial or non-commercial basis, as defined here, subject to the terms and conditions set forth herein. THE AUTHOR, as Licensor, grants to you, the LICENSEE, a non-exclusive, non-transferable right to use this SOFTWARE, subject to the terms of the license as described below:

LICENSEE may:

  • Install and use the SOFTWARE on any computer during the annual license subcription, provided that the software cannot be used by more than one developer at a time,
  • make backup copies of the SOFTWARE for its use provided they bear THE AUTHOR copyright notice,
  • use the SOFTWARE in custom or commercial COMPILED APPLICATIONS created by the original LICENSEE as long as the LICENSEE geys additional deployment licenses.

LICENSEE may not:

  • use the SOFTWARE for development after expiration of the annual development license subscription,
  • distribute copies of the SOFTWARE to others (except as an integral part of a COMPILED APPLICATION within the terms of this License) or electronically transfer the SOFTWARE from one computer to another over a network,
  • distribute copies of the SOFTWARE as an integral part of a development shell or non COMPILED APPLICATION,
  • decompile, reverse engineer, disassemble, or otherwise reduce the SOFTWARE to a human perceivable form, as the SOFTWARE contains trade secrets,
  • modify, alter or remove any copyright notice, trademarks, logos, or any of THE AUTHOR marks of intelectual property,
  • use backup copies of the SOFTWARE (or allow any third party to do so) for any other purpose than replacing the orginal SOFTWARE.
  • MODIFY, ADAPT, TRANSLATE, RENT, LEASE, LOAN OR RESELL FOR PROFIT THE SOFTWARE OR ANY PART THEREOF.

LICENSEE must:

  • get additional development license to ensure that they have appropriate number of development licenses for the number of developers using THE SOFTWARE in their developments,
  • get additional deployment licenses to ensure that they have the appropriate number of deployment license each time they deploy the SOFTWARE on more than the number of computers included in the annual developer license.

4.2. Initial Term. The term of the DEVELOPER LICENSE shall commence upon payment of the first annual developer license fee for the period of one (1) year, unless terminated sooner pursuant to the provisions of this Agreement.

4.3. Renewal Terms. After the initial or renewal terms, THE LICENSEE must renew his license if he is still using THE SOFTWARE in his developments (Licensee's Software) or continue to deploy Licensee's Software that uses THE SOFTWARE. THE LICENSEE shall pay his license renewal thru one of the authorized distributor of the SOFTWARE.
If THE LICENSEE does not renew his license, THE LICENSEE must not use THE SOFTWARE anymore in his developments or continue to deploy Licensee's Software that uses THE SOFTWARE.
The license fee for each such renewal term shall be raised no more than twenty-five (25%) percent from the previous year's licensing fee.

5.Termination.
This license is effective until terminated. This license will terminate immediately without notice from THE AUTHOR if you fail to comply with any of its provisions. Upon termination you must destroy the SOFTWARE and all copies thereof, and you may terminate this license at any time by doing so.

6.Update Policy.
THE AUTHOR may create, from time to time, produce updated versions of the SOFTWARE. At its option, THE AUTHOR will make such updates available to the Licensee. Updated versions will constitute one an only product with the SOFTWARE subject of this agreement. All updates (minor or major) will be free of charge during Initial Term and Renewel Terms.

7.Warranty Disclaimer.
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED , INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHOR DOES NOT WARRANT, GUARANTEE, OR MAKE ANY REPRESENTATIONS REGARDING THE USE, OR THE RESULTS OF THE USE, OF THE SOFTWARE OR WRITTEN MATERIALS IN THE TERMS OF CORRECTNESS, ACCURACY, RELIABILITY, CURRENTNESS OR OTHERWISE. THE ENTIRE RISK AS TO THE RESULTS AND PERFORMANCE OF THE SOFTWARE IS ASSUMED BY YOU. IF THE SOFTWARE OR WRITTEN MATERIALS ARE DEFECTIVE YOU, AND NOT THE AUTHOR OR IT'S DEALERS,
DISTRIBUTORS, AGENTS, OR EMPLOYEES, ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. However, if the software has been sold to you on disk(s), THE AUTHOR warrants to the original Licensee that the disk(s) on which the Software is recorded is free from defects in materials and workmanship under normal use and service for a period of thirty (30) days from the date of delivery as evidenced by a copy of the receipt.
THIS IS THE ONLY WARRANT OF ANY KIND, EITHER EXPRESS OR IMPLIED, THAT IS MADE BY THE AUTHOR ON THIS SOFTWARE PRODUCT. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY THE AUTHOR, IT'S DEALERS, DISTRIBUTORS, AGENTS, OR EMPLOYEES SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE SCOPE OF THIS WARRANTY, AND YOU MAY NOT RELY ON SUCH INFORMATION OR ADVICE. THIS WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS. YOU MAY HAVE OTHER RIGHTS, WHICH VARY FROM STATE TO STATE.

8.Miscellaneous Provisions.
LICENSEE shall not directly or indirectly transfer the SOFTWARE to any country to which such transfer would be prohibited by any applicable export control laws.
No change or modification to this Agreement will be valid unless it is in writing and is signed by a duly authorized representative of each party.
If any provision of this Agreement is held to be unenforceable, the remainder of this Agreement shall continue in full force and effect.
The waiver by THE AUTHOR of one breach or default hereunder shall not constitute the waiver of any subsequent breach or default.
This is the entire agreement between THE AUTHOR and LICENSEE relating to the contents of the SOFTWARE and supersedes any other communications with respect to the SOFTWARE.
The relationship between THE AUTHOR and the LICENSEE is that of LICENSOR/LICENSEE. In all matters regarding to the present Agreement, the LICENSEE shall act as an independent contractor.

9.Licensee's status.
The terms and conditions of the present license regarding THE AUTHOR's liability cannot exclude any other legal warranty arising from a legislation of the user's country and takes precedence over the contravening provision.
Equally, some countries forbid the limitation and exclusion of liabilities mentioned above for the consecutive or incidental damages, consequently the present limitation of liability might not be applicable in this case.

10.Non-Disclosure.
The LICENSEE undertakes to respect the confidentiality of information and document which are prensented as such by THE AUTHOR, particularly the present Agreement and the results of any benchmark tests, without prior written consent of THE AUTHOR.

11.Governing Law.
This agreement shall be governed by the french laws.

YOU ACKNOWLEDGE TO HAVE READ, UNDERSTOOD AND AGREED TO BE BOUND BY THE TERMS AND CONDITIONS OF THE CONTRACT INDICATED ABOVE.
Should you have any questions, please contact THE AUTHOR or the nearest distributor.

* Notice to United States Government end users:
Use, duplication or disclosure by the US Government is subject to restrictions stated in paragraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at 252.227-7013.

Serial ToolKit for 4D and the Serial ToolKit Logo are trademarks of Christian Quest

Serial ToolKit ©1999-2000 Christian Quest - All rights reserved


Welcome to Serial ToolKit™ homepage !

Serial ToolKit™ it is a 4D plug-in which gives a better serial port support inside 4th Dimension programming language.

STK contains a dozen of commands allowing to get information regarding available serial ports, open, close, configure a port, send and receive data, etc.

This page gives informations about the features, system requirement, tech support, download sites, licensing, pricing and ordering of Serial ToolKit.

The current version of Serial ToolKit is available for the MacOS and Windows version of 4th Dimension.

 


Overview of features

With Serial ToolKit you can:
  • get a list of available serial ports (including additional serial ports added by PCI cards, USB adapters, or PC Cards)
  • open and configure a serial port (speed, parity, hand-shake, etc)
  • change the serial port buffer size
  • send and receive information

For more details, have a look at Serial ToolKit's Manual


 

Download Serial ToolKit

BY DOWNLOADING SERIAL TOOLKIT, YOU AGREE TO BECOME BOUND BY THE TERMS OF THE LICENSE AGREEMENT, WHICH INCLUDES THE SOFTWARE LICENSE AND WARRANTY DISCLAIMER

Download form  


 

System requirements

Operating System

The current version of Serial ToolKit only works on Macintosh computer running System 7.5 and above or Windows 95/98/NT/2000. 

 


Getting help : Technical Support &Mailing-List

All technical support regarding Serial ToolKit is done by email: serial-toolkit-support@cquest.org

A dedicated mailing list is also available.

To subscribe to the Serial ToolKit Mailing List, please send a message to STK-subscribe@cquest.org

To unsubscribe to the Serial ToolKit Mailing List, please send a message to STK-unsubscribe@cquest.org

To post a message on the list, please send your message to STK-List@cquest.org


Installing Serial ToolKit

Just copy the "SerialToolKit.4DX" icon into the MAC4DX and/or WIN4DX folder of the 4th Dimension Database in which you want to use Serial ToolKit.

There's nothing more to do !

Demo version

The Demo version of Serial ToolKit will run for a 30 minute period. After that evaluation or demonstration period, Serial ToolKit will not run anymore. you'll have to quit your 4D database then relaunch it to be able to use it for an additionnal evaluation/demonstration period.

 


Using Serial ToolKit

The following section of this document will review each Serial ToolKit command, the parameters you can pass to it, the optional flags values and the error it may return.

 

Initialization

STK_Init

Syntax: err := STK_Init(serialTxt;serialNum)

Initializes STK with its license number.

<- err (longint)

-> serialTxt (Alpha) : Alphanumeric part of STK's license number

-> serialNum (Longint) : Numeric part of STK's license number


Getting informations about available serial ports

STK_CountPorts

Syntax: err := STK_CountPorts(nbPorts)

Returns the number of available serial ports

<- err (longint)

<- nbports (longint)


STK_GetIndPort

Syntax: err = STK_GetIndPort(portIndex; portName; inputDriverName; outputDriverName)

Returns portname, inputdrivername and outputdriver of the nth available serial port (from 1 to STK_CountPorts).

<- err (longint)

-> portindex (longint)

<- portname (string)

<- inputDriverName (string)

<- outputDriverName (string)


Opening and closing serial ports

STK_Open

Syntax: err = STK_Open(portindex; refNum)

Opens the specified serial port (portIndex takes values from 1 to STK_CountPorts)

refNum is the reference number of the opened serial driver which will be needed in subsequent calls.

<- err (longint)

-> portindex (longint)

<- refnum (longint)


STK_Close

Syntax: err = STK_Close(refNum)

Closes the specified driver (previously opened with STK_Open).

<- err (longint)

-> refnum (longint) (as previously returned by STK_Open)


Configuring serial ports

STK_Reset

Syntax: err := STK_Reset(refNum; config)

Configure the given serial driver baudrate, number of bits, stops, parity. Config is calculated the same way as usual.

<- err (longint)

-> refnum (longint) (as previously returned by STK_Open)

-> config (longint)

Config is calculated by adding the following constants:

Baud rate:

  • baud150 = 763
  • baud300 = 380
  • baud600 = 189
  • baud1200 = 94
  • baud1800 = 62
  • baud2400 = 46
  • baud3600 = 30
  • baud4800 = 22
  • baud7200 = 14
  • baud9600 = 10
  • baud14400 = 6
  • baud19200 = 4
  • baud28800 = 2
  • baud38400 = 1
  • baud57600 = 0

Stop bits:

  • stop10 = 16384
  • stop15 = -32768
  • stop20 = -16384

Parity:

  • noParity = 0
  • oddParity = 4096
  • evenParity = 12288

Number of data bits:

  • data5 = 0
  • data6 = 2048
  • data7 = 1024
  • data8 = 3072

Example:

$err := STK_Reset(refnum; baud9600 + stop10 + noParity + data8 ) ` for 4Dv6.0 and above

$err := STK_Reset(refnum; 10 + 16384 + 0 + 3072 ) ` for 4D version prior to 6.0


STK_HShake

Syntax: err := STK_HShake(refNum; handShakeType; xOnChar; xOffChar)

Modifies the serial driver handshaking mode for the given serial port.

<- err (longint)

-> refnum (longint) (as previously returned by STK_Open)

-> handShakeType (longint) (0 = no handskahe, 1 = Xon/Xoff, 2 = CTS, 3 = DTR, 4 = CTS/DTR)

-> xOnChar (integer)

-> xOffChar (integer)


STK_SetBuf

Syntax: err = STK_SetBuf(refNum; inputBufferSize; outputBufferSize)

Allocates a new buffer of buffsize bytes for the opened serial port.

<- err (longint)

-> refnum (longint) (as previously returned by STK_Open)

-> inputBufferSize (longint)

-> outputBufferSize (longint)


Getting informations about an opened serial port

STK_Status

Syntax: err := STK_Status(refNum, cummErrs, xOffSent, rdPend, wrPend, ctsHold, xOffHold, dsrHold, modemStatus)

Returns status information regarding the given serial driver.

<- err (longint)

-> refnum (longint) (as previously returned by STK_Open)

<- cummErrs (longint)

<- xOffSent (longint)

<- rdPend (longint)

<- wrPend (longint)

<- ctsHold (longint)

<- xOffHold (longint)

<- dsrHold (longint)

<- modemStatus (longint)


STK_GetBuf

Syntax: err := STK_GetBuf(refNum; bytesAvailable)

Returns the number of bytes available in the input buffer.

<- err (longint)

-> refnum (longint) (as previously returned by STK_Open)

<- bytesAvailable (longint)


Sending and receiving data

STK_Send

Syntax: err := STK_Send(refNum; dataToSend)

Send some data on an output serial driver

<- err (longint)

-> refnum (longint) (as previously returned by STK_Open)

-> dataToSend (text)


STK_Receive

Syntax: err := STK_Receive(refNum; dataStorage; maxLen)

Receives some data on the given input serial driver. dataStorage (C_TEXT) will hold the received data, maxLen (C_LONGINT) will indicate the maximum number of bytes to be read. If maxLen is 0, STK_Receive will receive the available number of bytes as returned by STK_GetBuf. If maxLen is greater than the available amount of data, STK_Receive will return the available amount of data.

<- err (longint)

-> refnum (longint) (as previously returned by STK_Open)

<- datastorage (text)

-> maxlen (longint)

 


Serial ToolKit ©1999-2000 Christian Quest - All rights reserved

Written by Christian Quest - 5-Dec-2000